<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>

  <style>
    .triangle {
      width: 0px;
      height: 0px;
      border: 30px transparent solid;
    }

    .triangle.triangle-top {
      border-top-color: red;
    }

    .triangle.triangle-bottom {
      border-bottom-color: red;
    }

    .triangle.triangle-left {
      border-left-color: red;
    }

    .triangle.triangle-right {
      border-right-color: red;
    }
  </style>

</head>

<body>
  <div class="triangle triangle-top"></div>
  <div class="triangle triangle-bottom"></div>
  <div class="triangle triangle-left"></div>
  <div class="triangle triangle-right"></div>
</body>

</html>